package com.ruoyi.system.domain;

import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 活动信息对象 buz_task
 * 
 * @author ruoyi
 * @date 2023-08-27
 */
@Data
public class BuzTask extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private String id;

    /** 活动标题 */
    @Excel(name = "活动标题")
    private String title;

    /** 开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /** 结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /** 活动说明 */
    @Excel(name = "活动说明")
    private String memo;

    /** 状态 */
    @Excel(name = "状态")
    private String status;

    /** 参与人数限制（0:不限;2:限制） */
    @Excel(name = "参与人数限制", readConverterExp = "0=:不限;2:限制")
    private Integer joinInType;

    /** 限制参与人数 */
    @Excel(name = "限制参与人数")
    private Integer limitMans;

    /** 可参与地区(0:全部;1:部分地区) */
    @Excel(name = "可参与地区(0:全部;1:部分地区)")
    private Integer joinInAreaType;

    /** 联系信息(0:关闭;1:开启) */
    @Excel(name = "联系信息(0:关闭;1:开启)")
    private Integer contactInfo;

    /** 联系信息(0:参与前填写;1:参与后填写) */
    @Excel(name = "联系信息(0:参与前填写;1:参与后填写)")
    private Integer contactInfoInput;

    /** 用户修改限制(0:可修改;1:不可修改) */
    @Excel(name = "用户修改限制(0:可修改;1:不可修改)")
    private Integer contactInfoModify;

    /** 需填信息(姓名;联系电话;联系地址) */
    @Excel(name = "需填信息(姓名;联系电话;联系地址)")
    private String needInfo;

    /** 电话短信验证(0:关闭;1:开启) */
    @Excel(name = "电话短信验证(0:关闭;1:开启)")
    private Integer contactInfoSms;

    /** 答题类型(0:随机出题;1:固定顺序) */
    @Excel(name = "答题类型(0:随机出题;1:固定顺序)")
    private Integer examType;

    /** 总题量 */
    @Excel(name = "总题量")
    private Integer totalQuestions;

    /** 试卷题量 */
    @Excel(name = "试卷题量")
    private Integer examQuestions;

    /** 题目分数 */
    @Excel(name = "题目分数")
    private Integer questionPoints;

    /** 试卷总分 */
    @Excel(name = "试卷总分")
    private Integer examPoints;

    /** 答题时间类型(0:不限;1:总时间限制;2:每题时间) */
    @Excel(name = "答题时间类型(0:不限;1:总时间限制;2:每题时间)")
    private Integer answerTimeType;

    /** 限制秒数 */
    @Excel(name = "限制秒数")
    private Integer limitTimes;

    /** 判断对错时机(0:选择时判断;1:提交时判断) */
    @Excel(name = "判断对错时机(0:选择时判断;1:提交时判断)")
    private Integer judgeType;

    /** 参加抽奖分数 */
    @Excel(name = "参加抽奖分数")
    private Integer awardsPoints;

    /** 总抽奖机会(0:不限;1:限制) */
    @Excel(name = "总抽奖机会(0:不限;1:限制)")
    private Integer totalAwardsTimesType;

    /** 总抽奖限制次数 */
    @Excel(name = "总抽奖限制次数")
    private Integer totalAwardsTimes;

    /** 每日每人抽奖次数 */
    @Excel(name = "每日每人抽奖次数")
    private Integer everyDateAwardsTimes;

    /** 总参与机会(0:不限;1:限制) */
    @Excel(name = "总参与机会(0:不限;1:限制)")
    private Integer totalJoinTimesType;

    /** 总参与机会限制次数 */
    @Excel(name = "总参与机会限制次数")
    private Integer totalJoinTimes;

    /** 每日每人参与机会次数 */
    @Excel(name = "每日每人参与机会次数")
    private Integer everyDateJoinTimes;

    /** 每人中奖次数限制 */
    @Excel(name = "每人中奖次数限制")
    private Integer everyoneCanAwardsTimes;

    /** 每人每日中奖次数限制(0:不限制;1:限制) */
    @Excel(name = "每人每日中奖次数限制(0:不限制;1:限制)")
    private Integer everyoneEverydateAwardsType;

    /** 每人每日中奖次数限制 */
    @Excel(name = "每人每日中奖次数限制")
    private Integer everyoneEverydateAwardsTimes;

    /** 抽奖模式(0:按时间均匀发放) */
    @Excel(name = "抽奖模式(0:按时间均匀发放)")
    private Integer awardType;

    /** 主办单位 */
    @Excel(name = "主办单位")
    private String organizer;

    /** 主办单位网站链接 */
    @Excel(name = "主办单位网站链接")
    private String organizerWebsite;

    @Excel(name = "活动中奖率")
    private String awardsRate;
    
    /**app模板设置*/
    private String appSetting;

    //抽奖时间段，格式 起始时间和结束时间横杠"-"分隔，时间段之间逗号","分隔
    //例如："08:30-12:00,20:00-23:00"
    //默认值 "08:30-24:00"
    private String awardsTimeInterval;

    @Excel(name = "活动图片")
    private String iconUrl;
    
    /** 多少分钟发一个奖品 */
    @Excel(name = "多少分钟发一个奖品")
    private Integer awardNumsMinu;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("title", getTitle())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("memo", getMemo())
            .append("status", getStatus())
            .append("joinInType", getJoinInType())
            .append("limitMans", getLimitMans())
            .append("joinInAreaType", getJoinInAreaType())
            .append("contactInfo", getContactInfo())
            .append("contactInfoInput", getContactInfoInput())
            .append("contactInfoModify", getContactInfoModify())
            .append("needInfo", getNeedInfo())
            .append("contactInfoSms", getContactInfoSms())
            .append("examType", getExamType())
            .append("totalQuestions", getTotalQuestions())
            .append("examQuestions", getExamQuestions())
            .append("questionPoints", getQuestionPoints())
            .append("examPoints", getExamPoints())
            .append("answerTimeType", getAnswerTimeType())
            .append("limitTimes", getLimitTimes())
            .append("judgeType", getJudgeType())
            .append("awardsPoints", getAwardsPoints())
            .append("totalAwardsTimesType", getTotalAwardsTimesType())
            .append("totalAwardsTimes", getTotalAwardsTimes())
            .append("everyDateAwardsTimes", getEveryDateAwardsTimes())
            .append("totalJoinTimesType", getTotalJoinTimesType())
            .append("totalJoinTimes", getTotalJoinTimes())
            .append("everyDateJoinTimes", getEveryDateJoinTimes())
            .append("everyoneCanAwardsTimes", getEveryoneCanAwardsTimes())
            .append("everyoneEverydateAwardsType", getEveryoneEverydateAwardsType())
            .append("everyoneEverydateAwardsTimes", getEveryoneEverydateAwardsTimes())
            .append("awardType", getAwardType())
            .append("organizer", getOrganizer())
            .append("organizerWebsite", getOrganizerWebsite())
                .append("awardsRate", getAwardsRate())
            .toString();
    }
}
